package com.xuecheng.ucenter.controller;

import com.xuecheng.api.ucenter.XcUserControllerApi;
import com.xuecheng.framework.domain.ucenter.ext.XcUserExt;
import com.xuecheng.ucenter.service.XcUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("/ucenter")
@RestController
public class XcUserController implements XcUserControllerApi {

    @Autowired
    XcUserService xcUserService;


    /**
     * @Description: 根据用户名查询用户是否存在
     * @Param: usernmae
     * @return: XcUserExt
     * @Author: Mr.Yuan
     * @Date:
     */
    @GetMapping("/findOne/{username}")
    @Override
    public XcUserExt getUser(@PathVariable("username") String username) {

        return xcUserService.getUser(username);
    }
}
